package com.tarena.lbs.basic.dao.repository.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tarena.lbs.basic.dao.mapper.AreaMapper;
import com.tarena.lbs.basic.dao.repository.AreaRepository;
import com.tarena.lbs.basic.pojo.po.AreaPO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Slf4j
@Repository
public class AreaRepositoryImpl implements AreaRepository {
    @Autowired
    private AreaMapper areaMapper;
    @Override
    public List<AreaPO> list() {
        log.debug("查询所有区域信息");
        return areaMapper.selectList(null);
    }

    @Override
    public List<AreaPO> list(QueryWrapper<AreaPO> queryWrapper) {
        return areaMapper.selectList(queryWrapper);
    }
}
